OE update using_euphoria 6

editing_source

Documentation Version for Comments and Changes

You are invited to make any changes...add any comments.

Changes will `eventually` be merged into the offical documentation.

Leave any commnents here...

...

... back to index page OE documentation



You can just type:

foo.ex 

to run your program. You could even shorten the name to simply "foo". Euphoria ignores the first line when it starts with #!. Be careful though that your first line ends with the Unix-style \n, and not the Windows-style \r\n, or the unix shell might get confused. If your file is shrouded, you must give the path to eub, not eui.

You can also run bind to combine your Euphoria program with the eui interpreter, to make a stand-alone executable file. With a stand-alone executable, you can redirect standard input and output. Binding is discussed further in Distributing a Program.

Using the Euphoria To C Translator, you can also make a stand-alone executable file, and it will normally run much faster than a bound program.

Running under Windows

You can run Euphoria programs directly from the Windows environment, or from a console shell that you have opened from Windows. By "associating" .ex files with eui.exe and .exw files with euiw.exe. You will then be able to double click a Euphoria source file to run it. The installer will perform this operation for you, if you wish.

Editing a Program

If you have not selected your "favorite editor," then try edx:

You can use any text editor to edit a Euphoria program. However, Euphoria comes with its own special editor that is written entirely in Euphoria. Type: edx followed by the complete name of the file you wish to edit. You can use this editor to edit any kind of text file. When you edit a Euphoria file some extra features such as color syntax highlighting and auto-completion of certain statements are available to make your job easier.

Whenever you run a Euphoria program and get an error message, during compilation or execution, you can simply type edx with no file name and you will be automatically positioned in the file containing the error, at the correct line and column, and with the error message displayed at the top of the screen.

Under Windows you can associate edx.bat with various kinds of text files that you want to edit. Color syntax highlighting is provided for .ex, .exw, .exd, .e and .pro (profile files).

Most keys that you type are inserted into the file at the cursor position. Hit the Esc key once to get a menu bar of special commands. The arrow keys, and the Insert/Delete/Home/End/PageUp/PageDown keys are also active. Under Linux/FreeBSD some keys may not be available, and alternate keys are provided. See Edx Demonstration Code Editor for a complete description of the editing commands.

If you need to understand or modify any detail of the editor's operation, you can edit the file edx.ex in euphoria\bin (be sure to make a backup copy so you don't lose your ability to edit). If the name edx conflicts with some other command on your system, simply rename the file euphoria\bin\edx.bat to something else. Because this editor is written in Euphoria, it is remarkably concise and easy to understand. The same functionality implemented in a language like C, would take far more lines of code.

edx is a simple text-mode editor that runs on all platforms and is distributed with Euphoria. There is a list of other editors at the OpenEuphoria web site, many of which include extra

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu